<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SWM34S_LVGL7.11_SWMUI: C:/Users/DELL/Desktop/Commit/lvgl/SWM34S_LVGL7.11_SWMUI_20230515/APP/Common Module/mem_sdram.h 文件参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">SWM34S_LVGL7.11_SWMUI<span id="projectnumber">&#160;V7.9</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.5 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_0ca16891106f5a3e9ad635a0d6c5f98f.html">APP</a></li><li class="navelem"><a class="el" href="dir_df4e0e4e72f77ab290fd1a24f190250a.html">Common Module</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">宏定义</a> &#124;
<a href="#func-members">函数</a>  </div>
  <div class="headertitle"><div class="title">mem_sdram.h 文件参考</div></div>
</div><!--header-->
<div class="contents">

<p>管理片内 SDRAM 存储空间  
<a href="#details">更多...</a></p>
<div class="textblock"><code>#include &quot;SWM341.h&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
mem_sdram.h 的引用(Include)关系图:</div>
<div class="dyncontent">
<div class="center"><img src="mem__sdram_8h__incl.png" border="0" usemap="#a_c_1_2_users_2_d_e_l_l_2_desktop_2_commit_2lvgl_2_s_w_m34_s___l_v_g_l7_811___s_w_m_u_i__20230515_2_a_p_p_2_common_01_module_2mem__sdram_8h" alt=""/></div>
<map name="a_c_1_2_users_2_d_e_l_l_2_desktop_2_commit_2lvgl_2_s_w_m34_s___l_v_g_l7_811___s_w_m_u_i__20230515_2_a_p_p_2_common_01_module_2mem__sdram_8h" id="a_c_1_2_users_2_d_e_l_l_2_desktop_2_commit_2lvgl_2_s_w_m34_s___l_v_g_l7_811___s_w_m_u_i__20230515_2_a_p_p_2_common_01_module_2mem__sdram_8h">
<area shape="rect" title="管理片内 SDRAM 存储空间" alt="" coords="5,5,229,75"/>
<area shape="rect" title=" " alt="" coords="74,123,161,148"/>
</map>
</div>
</div><div class="textblock"><div class="dynheader">
此图展示该文件直接或间接的被哪些文件引用了:</div>
<div class="dyncontent">
<div class="center"><img src="mem__sdram_8h__dep__incl.png" border="0" usemap="#a_c_1_2_users_2_d_e_l_l_2_desktop_2_commit_2lvgl_2_s_w_m34_s___l_v_g_l7_811___s_w_m_u_i__20230515_2_a_p_p_2_common_01_module_2mem__sdram_8hdep" alt=""/></div>
<map name="a_c_1_2_users_2_d_e_l_l_2_desktop_2_commit_2lvgl_2_s_w_m34_s___l_v_g_l7_811___s_w_m_u_i__20230515_2_a_p_p_2_common_01_module_2mem__sdram_8hdep" id="a_c_1_2_users_2_d_e_l_l_2_desktop_2_commit_2lvgl_2_s_w_m34_s___l_v_g_l7_811___s_w_m_u_i__20230515_2_a_p_p_2_common_01_module_2mem__sdram_8hdep">
<area shape="rect" title="管理片内 SDRAM 存储空间" alt="" coords="755,5,979,75"/>
<area shape="rect" href="load__mv_8c.html" title="播放 avi / wav 音视频" alt="" coords="384,123,608,192"/>
<area shape="rect" href="mem__sdram_8c.html" title="管理片内 SDRAM 存储空间" alt="" coords="632,123,856,192"/>
<area shape="rect" href="ui_8h.html" title="UI 页面布局" alt="" coords="880,130,1099,185"/>
<area shape="rect" href="ui__boot_8c.html" title="开机动画/视频页, 挂载文件系统完成主页素材的导入" alt="" coords="1123,130,1365,185"/>
<area shape="rect" href="setup__home__page__home_8c.html" title="Home 页" alt="" coords="5,357,224,427"/>
<area shape="rect" href="setup__home__page__m0_8c.html" title="M0 芯片选型页" alt="" coords="248,357,467,427"/>
<area shape="rect" href="setup__home__page__m4_8c.html" title="M4 芯片选型页" alt="" coords="491,357,709,427"/>
<area shape="rect" href="setup__home__page__pd_8c.html" title="产品介绍、应用宣传页" alt="" coords="733,357,952,427"/>
<area shape="rect" href="setup__home__page__pp_8c.html" title="GIF 演示、中文字体应用页" alt="" coords="1219,357,1437,427"/>
<area shape="rect" href="setup__scr__home_8c.html" title="创建主桌面" alt="" coords="1461,357,1680,427"/>
<area shape="rect" href="setup__scr__m0__m4_8c.html" title="创建 M0 / M4 芯片具体型号介绍展示页" alt="" coords="1704,357,1923,427"/>
<area shape="rect" href="ui__event_8h.html" title="UI 页面事件回调" alt="" coords="880,240,1099,309"/>
<area shape="rect" href="ui_8c.html" title="UI 页面布局" alt="" coords="1275,247,1493,302"/>
<area shape="rect" href="ui__event_8c.html" title="UI 页面事件回调" alt="" coords="976,357,1195,427"/>
</map>
</div>
</div>
<p><a href="mem__sdram_8h_source.html">浏览源代码.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
宏定义</h2></td></tr>
<tr class="memitem:abad9fc97d2a6d6254802626515e92585"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mem__sdram_8h.html#abad9fc97d2a6d6254802626515e92585">ALIGN_UP</a>(size,  align)&#160;&#160;&#160;(((size) + (align) - 1) &amp; ~((align) - 1))</td></tr>
<tr class="memdesc:abad9fc97d2a6d6254802626515e92585"><td class="mdescLeft">&#160;</td><td class="mdescRight">返回按照 align 对齐 size 后的值(向上对齐), 且 align 必须能被 2 整除(取值 1 例外) @eg <a class="el" href="mem__sdram_8h.html#abad9fc97d2a6d6254802626515e92585" title="返回按照 align 对齐 size 后的值(向上对齐), 且 align 必须能被 2 整除(取值 1 例外) @eg ALIGN_UP(10, 4) == 12">ALIGN_UP(10, 4)</a> == 12  <a href="mem__sdram_8h.html#abad9fc97d2a6d6254802626515e92585">更多...</a><br /></td></tr>
<tr class="separator:abad9fc97d2a6d6254802626515e92585"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad67ded8efbc52a780f97c578e5d8d786"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mem__sdram_8h.html#ad67ded8efbc52a780f97c578e5d8d786">ALIGN_DOWN</a>(size,  align)&#160;&#160;&#160;((size) &amp; ~((align) - 1))</td></tr>
<tr class="memdesc:ad67ded8efbc52a780f97c578e5d8d786"><td class="mdescLeft">&#160;</td><td class="mdescRight">返回按照 align 对齐 size 后的值(向下对齐), 且 align 必须能被 2 整除(取值 1 例外) @eg <a class="el" href="mem__sdram_8h.html#ad67ded8efbc52a780f97c578e5d8d786" title="返回按照 align 对齐 size 后的值(向下对齐), 且 align 必须能被 2 整除(取值 1 例外) @eg ALIGN_DOWN(10, 4) == 8">ALIGN_DOWN(10, 4)</a> == 8  <a href="mem__sdram_8h.html#ad67ded8efbc52a780f97c578e5d8d786">更多...</a><br /></td></tr>
<tr class="separator:ad67ded8efbc52a780f97c578e5d8d786"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
函数</h2></td></tr>
<tr class="memitem:ae1630464a6d7686e9e41daf4b38e74a8"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mem__sdram_8h.html#ae1630464a6d7686e9e41daf4b38e74a8">sdram_malloc</a> (size_t size)</td></tr>
<tr class="memdesc:ae1630464a6d7686e9e41daf4b38e74a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">申请一块内存  <a href="mem__sdram_8h.html#ae1630464a6d7686e9e41daf4b38e74a8">更多...</a><br /></td></tr>
<tr class="separator:ae1630464a6d7686e9e41daf4b38e74a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9ef7e7053d4000fe99a7eacc8d9346d7"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mem__sdram_8h.html#a9ef7e7053d4000fe99a7eacc8d9346d7">sdram_free</a> (void *ptr)</td></tr>
<tr class="memdesc:a9ef7e7053d4000fe99a7eacc8d9346d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">释放一块内存  <a href="mem__sdram_8h.html#a9ef7e7053d4000fe99a7eacc8d9346d7">更多...</a><br /></td></tr>
<tr class="separator:a9ef7e7053d4000fe99a7eacc8d9346d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5518679ba96822661667b2b3d5182379"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mem__sdram_8h.html#a5518679ba96822661667b2b3d5182379">sdram_get_idle_size</a> (void)</td></tr>
<tr class="memdesc:a5518679ba96822661667b2b3d5182379"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取空闲可用内存大小  <a href="mem__sdram_8h.html#a5518679ba96822661667b2b3d5182379">更多...</a><br /></td></tr>
<tr class="separator:a5518679ba96822661667b2b3d5182379"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p >管理片内 SDRAM 存储空间 </p>
<p >Apply to On-Chip SDRAM </p><dl class="section since"><dt>自从</dt><dd>Change Logs: Date Author Notes 2023-02-23 lzh the first version </dd></dl>
<dl class="section remark"><dt>备注</dt><dd>提供两类不同的实现方式 : LVGL内建 与 自定义实现</dd></dl>
<dl class="section attention"><dt>注意</dt><dd></dd></dl>
<p>THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, SYNWIT SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONN- -ECTION WITH THEIR PRODUCTS.</p>
<dl class="section copyright"><dt>版权所有</dt><dd>2012 Synwit Technology </dd></dl>

<p class="definition">在文件 <a class="el" href="mem__sdram_8h_source.html">mem_sdram.h</a> 中定义.</p>
</div><h2 class="groupheader">宏定义说明</h2>
<a id="abad9fc97d2a6d6254802626515e92585" name="abad9fc97d2a6d6254802626515e92585"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abad9fc97d2a6d6254802626515e92585">&#9670;&#160;</a></span>ALIGN_UP</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ALIGN_UP</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">size, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">align&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;(((size) + (align) - 1) &amp; ~((align) - 1))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>返回按照 align 对齐 size 后的值(向上对齐), 且 align 必须能被 2 整除(取值 1 例外) @eg <a class="el" href="mem__sdram_8h.html#abad9fc97d2a6d6254802626515e92585" title="返回按照 align 对齐 size 后的值(向上对齐), 且 align 必须能被 2 整除(取值 1 例外) @eg ALIGN_UP(10, 4) == 12">ALIGN_UP(10, 4)</a> == 12 </p>

<p class="definition">在文件 <a class="el" href="mem__sdram_8h_source.html">mem_sdram.h</a> 第 <a class="el" href="mem__sdram_8h_source.html#l00032">32</a> 行定义.</p>

</div>
</div>
<a id="ad67ded8efbc52a780f97c578e5d8d786" name="ad67ded8efbc52a780f97c578e5d8d786"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad67ded8efbc52a780f97c578e5d8d786">&#9670;&#160;</a></span>ALIGN_DOWN</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ALIGN_DOWN</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">size, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">align&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;((size) &amp; ~((align) - 1))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>返回按照 align 对齐 size 后的值(向下对齐), 且 align 必须能被 2 整除(取值 1 例外) @eg <a class="el" href="mem__sdram_8h.html#ad67ded8efbc52a780f97c578e5d8d786" title="返回按照 align 对齐 size 后的值(向下对齐), 且 align 必须能被 2 整除(取值 1 例外) @eg ALIGN_DOWN(10, 4) == 8">ALIGN_DOWN(10, 4)</a> == 8 </p>

<p class="definition">在文件 <a class="el" href="mem__sdram_8h_source.html">mem_sdram.h</a> 第 <a class="el" href="mem__sdram_8h_source.html#l00039">39</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">函数说明</h2>
<a id="ae1630464a6d7686e9e41daf4b38e74a8" name="ae1630464a6d7686e9e41daf4b38e74a8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae1630464a6d7686e9e41daf4b38e74a8">&#9670;&#160;</a></span>sdram_malloc()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void * sdram_malloc </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>size</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>申请一块内存 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>: 期望分配的内存块大小 </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>返回值</dt><dd>
  <table class="retval">
    <tr><td class="paramname">!NULL</td><td>: 分配的内存块首地址 </td></tr>
    <tr><td class="paramname">NULL</td><td>: error </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="mem__sdram_8c_source.html">mem_sdram.c</a> 第 <a class="el" href="mem__sdram_8c_source.html#l00130">130</a> 行定义.</p>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="mem__sdram_8h_ae1630464a6d7686e9e41daf4b38e74a8_icgraph.png" border="0" usemap="#amem__sdram_8h_ae1630464a6d7686e9e41daf4b38e74a8_icgraph" alt=""/></div>
<map name="amem__sdram_8h_ae1630464a6d7686e9e41daf4b38e74a8_icgraph" id="amem__sdram_8h_ae1630464a6d7686e9e41daf4b38e74a8_icgraph">
<area shape="rect" title="申请一块内存" alt="" coords="1515,284,1617,309"/>
<area shape="rect" href="load__mv_8c.html#a904f1d788d926c7864c948c4f9d1c66f" title="解析 avi 视频源" alt="" coords="1365,5,1467,31"/>
<area shape="rect" href="ui__event_8c.html#a5d0714ab1f8d703a7a6aa480a25ba608" title="GIF 轮播刷新任务(用于 M0 芯片素材显示)" alt="" coords="1370,360,1462,385"/>
<area shape="rect" href="ui__event_8c.html#ac098d7daab78175856fe3d9f75df0347" title="进入 M0 / M4 SHOW 页前的资源准备" alt="" coords="1171,309,1309,335"/>
<area shape="rect" href="setup__scr__home_8c.html#a9e86b57f14343f1fdf1b6450fbcdef08" title="创建主桌面" alt="" coords="331,359,449,384"/>
<area shape="rect" href="ui__event_8c.html#a443210034526535b309f60ac9de63be6" title="GIF 轮播刷新任务(用于 M4 芯片素材显示)" alt="" coords="1370,259,1462,284"/>
<area shape="rect" href="ui__event_8c.html#a58f9ab749ec978cf6b8533ef55bf1045" title="产品应用演示 GIF 轮播刷新任务" alt="" coords="1372,409,1460,435"/>
<area shape="rect" href="ui__event_8c.html#a9a58add9c7451890f77c03ad8136b20d" title="中文字体 与 GIF 轮播演示 任务" alt="" coords="1372,157,1460,183"/>
<area shape="rect" href="ui__event_8c.html#a22a386f4f548c71737aba2415eba22fd" title="开始/暂停 按钮" alt="" coords="1181,144,1299,169"/>
<area shape="rect" href="mem__sdram_8c.html#a1792f14452da6eb907e7a58e57c20ba6" title="测试本模块内存管理" alt="" coords="1379,561,1453,587"/>
<area shape="rect" href="ui__event_8c.html#aad0d0389b8cba40e9e02c141ce143196" title="上一张 / 下一张 按钮" alt="" coords="1163,69,1317,95"/>
<area shape="rect" href="ui__event_8c.html#ae6df285ba38cc8bc750993fa625b328a" title="进入 PP 页前的资源准备" alt="" coords="1185,459,1295,484"/>
<area shape="rect" href="ui__boot_8c.html#ad915e3f7b5aab86e375414a5844c500a" title="挂载文件系统以完成本地素材检测, 并将其导入至 SDRAM , 同时实现开机动画/视频效果" alt="" coords="358,497,422,523"/>
<area shape="rect" href="ui__event_8c.html#aa79ab1e226edfa66cf11eb85278bbc62" title="M0 页 跳转 M0_SHOW 页的按钮回调" alt="" coords="963,309,1107,335"/>
<area shape="rect" href="ui__event_8c.html#a4cc241fe1f2755f3c46c7dadbd3f58e2" title="M4 页 跳转 M4_SHOW 页的按钮回调" alt="" coords="963,359,1107,384"/>
<area shape="rect" href="ui__event_8c.html#a3d4333831962ec3ffc6e449faad388f7" title="主桌面 M0 页注册事件回调" alt="" coords="719,309,901,335"/>
<area shape="rect" href="setup__home__page__m0_8c.html#aa198ac34b1b6fa9f86d497cc3baf1d19" title="创建 M0 页" alt="" coords="504,309,657,335"/>
<area shape="rect" href="ui_8c.html#a42bb09ef137aaeb1733173f3a88ccc85" title="UI 初始化" alt="" coords="227,371,283,396"/>
<area shape="rect" href="main_8c.html#a8f1efe6291a27ae9b326f0c8a236c102" title="Go to User App Execute" alt="" coords="104,421,179,447"/>
<area shape="rect" href="main_8c.html#a840291bc02cba5474a4cb46a9b9566fe" title="C_Main" alt="" coords="5,421,56,447"/>
<area shape="rect" href="ui__event_8c.html#a6dbae8eeb24298bef6c9090399d4f88c" title="主桌面 M4 页注册事件回调" alt="" coords="719,359,901,384"/>
<area shape="rect" href="setup__home__page__m4_8c.html#afb77653567b2b50aef74a97266462f0c" title="创建 M4 页" alt="" coords="504,359,657,384"/>
<area shape="rect" href="ui__event_8c.html#a052ee01ff73acb520e9ea854151fbdd2" title="进入 PD 页前的资源准备" alt="" coords="1185,409,1295,435"/>
<area shape="rect" href="ui__event_8c.html#a58a9ebadd92a9ee7765fea889ed07073" title="主桌面下 Home 页四个跳转按钮的事件回调" alt="" coords="956,409,1115,435"/>
<area shape="rect" href="ui__event_8c.html#a4f51ebc6c5bd5d4bdc6e80e1d5b3f554" title="tabview 的事件回调" alt="" coords="974,459,1097,484"/>
<area shape="rect" href="ui__event_8c.html#ac0feb967035c8b6b1949cd42c92cbc69" title="主桌面 Home 页注册事件回调" alt="" coords="712,408,908,433"/>
<area shape="rect" href="setup__home__page__home_8c.html#a236ec2e4ba252c597a6c8d695eb5e825" title="创建 Home 页" alt="" coords="497,408,664,433"/>
<area shape="rect" href="ui__event_8c.html#aab07f167804a29f9a34de078552c2fee" title="主桌面注册事件回调" alt="" coords="507,457,654,483"/>
<area shape="rect" href="ui__event_8c.html#ad1d3e81dc6359afc038bd1472b162e25" title="Picture 页 GIF 操作按钮回调 &#45; 左/中/右" alt="" coords="966,144,1105,169"/>
<area shape="rect" href="ui__event_8c.html#a4e9e72dc1392fbfa791b66d58f43cad0" title="主桌面 PP 页注册事件回调" alt="" coords="721,144,899,169"/>
<area shape="rect" href="setup__home__page__pp_8c.html#a2dc049611b8a6a5e649913c9ead4dc72" title="创建 Picture 页" alt="" coords="506,157,655,183"/>
</map>
</div>

</div>
</div>
<a id="a9ef7e7053d4000fe99a7eacc8d9346d7" name="a9ef7e7053d4000fe99a7eacc8d9346d7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9ef7e7053d4000fe99a7eacc8d9346d7">&#9670;&#160;</a></span>sdram_free()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t sdram_free </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>ptr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>释放一块内存 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">*ptr</td><td>: 分配的内存块首地址 </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>返回值</dt><dd>
  <table class="retval">
    <tr><td class="paramname">0</td><td>: success </td></tr>
    <tr><td class="paramname">other</td><td>: error code </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="mem__sdram_8c_source.html">mem_sdram.c</a> 第 <a class="el" href="mem__sdram_8c_source.html#l00183">183</a> 行定义.</p>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="mem__sdram_8h_a9ef7e7053d4000fe99a7eacc8d9346d7_icgraph.png" border="0" usemap="#amem__sdram_8h_a9ef7e7053d4000fe99a7eacc8d9346d7_icgraph" alt=""/></div>
<map name="amem__sdram_8h_a9ef7e7053d4000fe99a7eacc8d9346d7_icgraph" id="amem__sdram_8h_a9ef7e7053d4000fe99a7eacc8d9346d7_icgraph">
<area shape="rect" title="释放一块内存" alt="" coords="1936,281,2023,307"/>
<area shape="rect" href="load__mv_8c.html#a978ed993bd878f76db92c810771c0ee8" title="关闭 avi 视频, 并释放所占用的资源" alt="" coords="1771,5,1867,31"/>
<area shape="rect" href="load__mv_8c.html#a904f1d788d926c7864c948c4f9d1c66f" title="解析 avi 视频源" alt="" coords="1768,55,1869,80"/>
<area shape="rect" href="ui__event_8c.html#a5d0714ab1f8d703a7a6aa480a25ba608" title="GIF 轮播刷新任务(用于 M0 芯片素材显示)" alt="" coords="1773,355,1865,380"/>
<area shape="rect" href="ui__event_8c.html#a443210034526535b309f60ac9de63be6" title="GIF 轮播刷新任务(用于 M4 芯片素材显示)" alt="" coords="1773,305,1865,331"/>
<area shape="rect" href="ui__event_8c.html#a58f9ab749ec978cf6b8533ef55bf1045" title="产品应用演示 GIF 轮播刷新任务" alt="" coords="1580,456,1668,481"/>
<area shape="rect" href="ui__event_8c.html#a9a58add9c7451890f77c03ad8136b20d" title="中文字体 与 GIF 轮播演示 任务" alt="" coords="1775,104,1863,129"/>
<area shape="rect" href="ui__event_8c.html#a22a386f4f548c71737aba2415eba22fd" title="开始/暂停 按钮" alt="" coords="1565,155,1683,180"/>
<area shape="rect" href="mem__sdram_8c.html#a1792f14452da6eb907e7a58e57c20ba6" title="测试本模块内存管理" alt="" coords="1782,557,1855,583"/>
<area shape="rect" href="ui__event_8c.html#a201743dfea0db58797dca624b7d9c5e5" title="退出 M0 / M4 SHOW 页前的清理、释放资源" alt="" coords="1749,256,1888,281"/>
<area shape="rect" href="ui__event_8c.html#a327a85392000232adf5057ea3bcd0322" title="退出 PP 页前的清理、释放资源" alt="" coords="1173,405,1282,431"/>
<area shape="rect" href="ui__event_8c.html#aad0d0389b8cba40e9e02c141ce143196" title="上一张 / 下一张 按钮" alt="" coords="1547,204,1701,229"/>
<area shape="rect" href="ui__boot_8c.html#ad915e3f7b5aab86e375414a5844c500a" title="挂载文件系统以完成本地素材检测, 并将其导入至 SDRAM , 同时实现开机动画/视频效果" alt="" coords="358,493,422,519"/>
<area shape="rect" href="load__mv_8c.html#a3a29f68f2d856a9c2eea3a328d5233e8" title="解码 avi 视频播放" alt="" coords="1571,5,1677,31"/>
<area shape="rect" href="ui__event_8c.html#ac098d7daab78175856fe3d9f75df0347" title="进入 M0 / M4 SHOW 页前的资源准备" alt="" coords="1350,329,1489,355"/>
<area shape="rect" href="ui__event_8c.html#aa79ab1e226edfa66cf11eb85278bbc62" title="M0 页 跳转 M0_SHOW 页的按钮回调" alt="" coords="963,355,1107,380"/>
<area shape="rect" href="ui__event_8c.html#a4cc241fe1f2755f3c46c7dadbd3f58e2" title="M4 页 跳转 M4_SHOW 页的按钮回调" alt="" coords="963,256,1107,281"/>
<area shape="rect" href="ui__event_8c.html#a3d4333831962ec3ffc6e449faad388f7" title="主桌面 M0 页注册事件回调" alt="" coords="719,355,901,380"/>
<area shape="rect" href="setup__home__page__m0_8c.html#aa198ac34b1b6fa9f86d497cc3baf1d19" title="创建 M0 页" alt="" coords="504,355,657,380"/>
<area shape="rect" href="setup__scr__home_8c.html#a9e86b57f14343f1fdf1b6450fbcdef08" title="创建主桌面" alt="" coords="331,355,449,380"/>
<area shape="rect" href="ui_8c.html#a42bb09ef137aaeb1733173f3a88ccc85" title="UI 初始化" alt="" coords="227,367,283,392"/>
<area shape="rect" href="main_8c.html#a8f1efe6291a27ae9b326f0c8a236c102" title="Go to User App Execute" alt="" coords="104,417,179,443"/>
<area shape="rect" href="main_8c.html#a840291bc02cba5474a4cb46a9b9566fe" title="C_Main" alt="" coords="5,417,56,443"/>
<area shape="rect" href="ui__event_8c.html#a6dbae8eeb24298bef6c9090399d4f88c" title="主桌面 M4 页注册事件回调" alt="" coords="719,256,901,281"/>
<area shape="rect" href="setup__home__page__m4_8c.html#afb77653567b2b50aef74a97266462f0c" title="创建 M4 页" alt="" coords="504,256,657,281"/>
<area shape="rect" href="ui__event_8c.html#a052ee01ff73acb520e9ea854151fbdd2" title="进入 PD 页前的资源准备" alt="" coords="1172,456,1283,481"/>
<area shape="rect" href="ui__event_8c.html#a58a9ebadd92a9ee7765fea889ed07073" title="主桌面下 Home 页四个跳转按钮的事件回调" alt="" coords="956,456,1115,481"/>
<area shape="rect" href="ui__event_8c.html#a4f51ebc6c5bd5d4bdc6e80e1d5b3f554" title="tabview 的事件回调" alt="" coords="974,405,1097,431"/>
<area shape="rect" href="ui__event_8c.html#ac0feb967035c8b6b1949cd42c92cbc69" title="主桌面 Home 页注册事件回调" alt="" coords="712,456,908,481"/>
<area shape="rect" href="setup__home__page__home_8c.html#a236ec2e4ba252c597a6c8d695eb5e825" title="创建 Home 页" alt="" coords="497,455,664,480"/>
<area shape="rect" href="ui__event_8c.html#aab07f167804a29f9a34de078552c2fee" title="主桌面注册事件回调" alt="" coords="507,405,654,431"/>
<area shape="rect" href="ui__event_8c.html#ad1d3e81dc6359afc038bd1472b162e25" title="Picture 页 GIF 操作按钮回调 &#45; 左/中/右" alt="" coords="1350,203,1489,228"/>
<area shape="rect" href="ui__event_8c.html#a4e9e72dc1392fbfa791b66d58f43cad0" title="主桌面 PP 页注册事件回调" alt="" coords="721,207,899,232"/>
<area shape="rect" href="setup__home__page__pp_8c.html#a2dc049611b8a6a5e649913c9ead4dc72" title="创建 Picture 页" alt="" coords="506,207,655,232"/>
<area shape="rect" href="ui__event_8c.html#a994ade1f62e3df92bae5eda56445c58e" title="M0 / M4 Show 页退出按钮回调" alt="" coords="1551,253,1697,279"/>
<area shape="rect" href="ui__event_8c.html#a905108d92ce4fd3bccf05e1aec5c24bd" title="M0 / M4 芯片具体型号介绍展示页注册事件回调" alt="" coords="1340,280,1499,305"/>
<area shape="rect" href="setup__scr__m0__m4_8c.html#a3f8c5e10b9dbf61ec407b6d84a885ab7" title="创建 M0 / M4 芯片具体型号介绍展示页" alt="" coords="1163,304,1292,329"/>
<area shape="rect" href="ui__event_8c.html#a7356df791bd9a4545b909645db43f2f1" title="主桌面下的四个页面 Home / Back 键的事件回调( H B )" alt="" coords="965,305,1105,331"/>
<area shape="rect" href="ui__event_8c.html#ae39dc4b65d8a15dbb98e2321040443a9" title="主桌面 PD 页注册事件回调" alt="" coords="721,305,899,331"/>
<area shape="rect" href="setup__home__page__pd_8c.html#ab3e09574fd12d91ac7158b266241f565" title="创建 Product 页" alt="" coords="506,305,655,331"/>
</map>
</div>

</div>
</div>
<a id="a5518679ba96822661667b2b3d5182379" name="a5518679ba96822661667b2b3d5182379"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5518679ba96822661667b2b3d5182379">&#9670;&#160;</a></span>sdram_get_idle_size()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t sdram_get_idle_size </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取空闲可用内存大小 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">/</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>返回值</dt><dd>
  <table class="retval">
    <tr><td class="paramname">内存池剩余可用内存大小</td><td></td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="mem__sdram_8c_source.html">mem_sdram.c</a> 第 <a class="el" href="mem__sdram_8c_source.html#l00231">231</a> 行定义.</p>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="mem__sdram_8h_a5518679ba96822661667b2b3d5182379_icgraph.png" border="0" usemap="#amem__sdram_8h_a5518679ba96822661667b2b3d5182379_icgraph" alt=""/></div>
<map name="amem__sdram_8h_a5518679ba96822661667b2b3d5182379_icgraph" id="amem__sdram_8h_a5518679ba96822661667b2b3d5182379_icgraph">
<area shape="rect" title="获取空闲可用内存大小" alt="" coords="1499,129,1640,155"/>
<area shape="rect" href="load__mv_8c.html#a978ed993bd878f76db92c810771c0ee8" title="关闭 avi 视频, 并释放所占用的资源" alt="" coords="1352,5,1448,31"/>
<area shape="rect" href="load__mv_8c.html#a904f1d788d926c7864c948c4f9d1c66f" title="解析 avi 视频源" alt="" coords="1349,55,1451,80"/>
<area shape="rect" href="ui__event_8c.html#a5d0714ab1f8d703a7a6aa480a25ba608" title="GIF 轮播刷新任务(用于 M0 芯片素材显示)" alt="" coords="1354,104,1446,129"/>
<area shape="rect" href="ui__event_8c.html#a443210034526535b309f60ac9de63be6" title="GIF 轮播刷新任务(用于 M4 芯片素材显示)" alt="" coords="1354,153,1446,179"/>
<area shape="rect" href="ui__event_8c.html#a58f9ab749ec978cf6b8533ef55bf1045" title="产品应用演示 GIF 轮播刷新任务" alt="" coords="1356,203,1444,228"/>
<area shape="rect" href="mem__sdram_8c.html#a1792f14452da6eb907e7a58e57c20ba6" title="测试本模块内存管理" alt="" coords="1363,252,1437,277"/>
<area shape="rect" href="load__mv_8c.html#a3a29f68f2d856a9c2eea3a328d5233e8" title="解码 avi 视频播放" alt="" coords="1179,5,1285,31"/>
<area shape="rect" href="ui__event_8c.html#ac098d7daab78175856fe3d9f75df0347" title="进入 M0 / M4 SHOW 页前的资源准备" alt="" coords="1163,104,1301,129"/>
<area shape="rect" href="ui__event_8c.html#aa79ab1e226edfa66cf11eb85278bbc62" title="M0 页 跳转 M0_SHOW 页的按钮回调" alt="" coords="963,55,1107,80"/>
<area shape="rect" href="ui__event_8c.html#a4cc241fe1f2755f3c46c7dadbd3f58e2" title="M4 页 跳转 M4_SHOW 页的按钮回调" alt="" coords="963,104,1107,129"/>
<area shape="rect" href="ui__event_8c.html#a3d4333831962ec3ffc6e449faad388f7" title="主桌面 M0 页注册事件回调" alt="" coords="719,55,901,80"/>
<area shape="rect" href="setup__home__page__m0_8c.html#aa198ac34b1b6fa9f86d497cc3baf1d19" title="创建 M0 页" alt="" coords="504,55,657,80"/>
<area shape="rect" href="setup__scr__home_8c.html#a9e86b57f14343f1fdf1b6450fbcdef08" title="创建主桌面" alt="" coords="331,129,449,155"/>
<area shape="rect" href="ui_8c.html#a42bb09ef137aaeb1733173f3a88ccc85" title="UI 初始化" alt="" coords="227,129,283,155"/>
<area shape="rect" href="main_8c.html#a8f1efe6291a27ae9b326f0c8a236c102" title="Go to User App Execute" alt="" coords="104,129,179,155"/>
<area shape="rect" href="main_8c.html#a840291bc02cba5474a4cb46a9b9566fe" title="C_Main" alt="" coords="5,129,56,155"/>
<area shape="rect" href="ui__event_8c.html#a6dbae8eeb24298bef6c9090399d4f88c" title="主桌面 M4 页注册事件回调" alt="" coords="719,104,901,129"/>
<area shape="rect" href="setup__home__page__m4_8c.html#afb77653567b2b50aef74a97266462f0c" title="创建 M4 页" alt="" coords="504,104,657,129"/>
<area shape="rect" href="ui__event_8c.html#a052ee01ff73acb520e9ea854151fbdd2" title="进入 PD 页前的资源准备" alt="" coords="1177,203,1287,228"/>
<area shape="rect" href="ui__event_8c.html#a58a9ebadd92a9ee7765fea889ed07073" title="主桌面下 Home 页四个跳转按钮的事件回调" alt="" coords="956,153,1115,179"/>
<area shape="rect" href="ui__event_8c.html#a4f51ebc6c5bd5d4bdc6e80e1d5b3f554" title="tabview 的事件回调" alt="" coords="974,203,1097,228"/>
<area shape="rect" href="ui__event_8c.html#ac0feb967035c8b6b1949cd42c92cbc69" title="主桌面 Home 页注册事件回调" alt="" coords="712,153,908,179"/>
<area shape="rect" href="setup__home__page__home_8c.html#a236ec2e4ba252c597a6c8d695eb5e825" title="创建 Home 页" alt="" coords="497,153,664,179"/>
<area shape="rect" href="ui__event_8c.html#aab07f167804a29f9a34de078552c2fee" title="主桌面注册事件回调" alt="" coords="507,203,654,228"/>
</map>
</div>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
</small></address>
</body>
</html>
